package com.xxzuibang.day16.stringbuffer类;

public class StringBufferExercise02 {
    public static void main(String[] args) {
        StringBuffer s=new StringBuffer("123456789.12");
        for (int i = s.indexOf(".")-3;i>0;i-=3) {
           s=s.insert(i,",");
        }

        System.out.println(s);
    }
}
